Q: Can I send messages to functions whose
windows don't have focus?
Programs can call grid functions and callback functions without regard to keyboard or
mouse focus. Everything works the same with or without focus. The only thing focus does is
route keyboard input to the focus window. Your program can set the keyboard focus to a
particular grid by sending the grid a #SetKeyboardFocus message.
Q: Messages sent with Windows API function
SendMessage() disappear. Why?
Windows messages are not the same as GraphicsDesigner or GuiDesigner messages. They have
different names, different values, and different arguments. They are utterly and totally
incompatible. But that's not all by a long shot !!!!!!!!
Any name similarities between Windows and GraphicsDesigner are coincidence! A Windows
window handle is not a GraphicsDesigner window or grid number. A Windows window procedure
is not a GuiDesigner window or grid function.
Windows API function SendMessage() is totally incompatible with XgrSendMessage() or
XuiSendMessage() . SendMessage() calls a Windows "window procedure". This window
procedure is not the same as any GraphicsDesigner window function or grid function.
The Windows message queue is not the GraphicsDesigner message queue !!! These message
queues are completely independent, separate, and different. GraphicsDesigner processes
some of the messages from the Windows message queue, and discards the rest. Sometimes
GraphicsDesigner adds one of its own messages to its own message queue as a result of a
Windows message, but your program never, ever sees or deals with the Windows messages.
Programs should never call SendMessage() to deal with a GraphicsDesigner window or grid.
Q: Why does SPACE$(1) create a different width
space with different fonts?
SPACE$(n) creates a string containing n space characters. When strings are displayed by a
GuiDesigner grid, the character width of every character, including the space character is
determined by the font - by typeface, size, boldness, italic. In monospace typefaces, the
width of the space character is the same as the width of all other characters in the same
font. In proportional typefaces, the width of every character varies by design, so no
characters, including the space character, is necessarily the same width as any other
character. In addition, when proportionally spaced text is "full justified",
meaning a straight left and right margin, the apparent width of space characters is varied
to flush the margins.